<template>
  <van-cell class="article-item"

  >
    <template #icon>
      <van-image
          class="right-cover"
          fit="cover"
          :src="article.coverPicMydxSpider"
      />
    </template>
    <div slot="title" class="title van-multi-ellipsis--l3" @click="gotodetail(article)"><div class="titletext">{{ article.title }}</div>
      <div>

        <div class="label-wrap">
          <span>{{ article.publishTime }}</span>
          <span>{{ article.dataSource }}</span>
          <span>{{ article.author }}</span>
        </div>
      </div>
      <!-- 默认插槽的名字叫 default，可以省略 -->

    </div>
  </van-cell>
</template>

<script>
export default {
  name: 'ArticleItem',
  components: {},
  props: {
    article: {
      type: Object,

    }
  },
  data() {
    return {}
  },
  computed: {},
  watch: {},
  created() {
  },
  mounted() {
  },
  methods: {
    gotodetail(item) {
      // console.log(item)
      this.$router.push({
        path: '/article',
        query: {
          'fileName': item.fileName,
          'dataSource': item.dataSource,
          'tableName': item.tableName,
          'sysId': item.sysId
        }
      })
    }


  }
}
</script>

<style scoped lang="less">
.titletext{
  margin-left: 2px;
  // width: 5.573rem;
  height: 1.2rem;
  font-family: PingFang-SC-Regular;
  font-size: 0.373rem;
  font-weight: normal;
  font-stretch: normal;
  letter-spacing: 0rem;
  color: #000000;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;

}
.article-item {
  .title {
    font-size: 14px;
    color: #3a3a3a;
  }

  /deep/ .van-cell__value {
    flex: unset;
    width: 116px;
    height: 73px;
    margin-left: 12px;
  }

  .right-cover {
    width: 116px;
    height: 73px;
    margin-right: 5px;
  }

  .cover-wrap {
    padding: 15px 0;
    display: flex;

    .cover-wrap-item {
      flex: 1;
      height: 73px;

      &:not(:last-child) {
        padding-right: 4px;
      }

      .cover-image {
        width: 100%;
        height: 73px;
      }
    }
  }

  .label-wrap {
    font-size: 11px;
    color: #b4b4b4;
  }

  .label-wrap span {
    margin-right: 12px;
  }
}
</style>